package com.vito.oa.act.event.service;

import java.util.HashSet;
import java.util.List;
import java.util.Set;

import org.springframework.context.ApplicationEvent;

import com.vito.base.model.MyHashMap;

/**
 * 工作流消息实体，包含流程信息及表单信息
 * @author xuezhennan
 * 
 */
public class ActivitiEvent extends ApplicationEvent {
	private static final long serialVersionUID = -1839753612872419266L;
	/**
	 * 审批发起时需要消息通知的流程
	 */
	public static final Set<String> START_EVENT_KEY = new HashSet<String>();
	/**
	 * 审批结束时消息通知的流程
	 */
	public static final Set<String> END_EVENT_KEY = new HashSet<String>();
	static{
		START_EVENT_KEY.add("asset_borrow");
		START_EVENT_KEY.add("asset_return");
		END_EVENT_KEY.add("leave");
		END_EVENT_KEY.add("asset_borrow");
		END_EVENT_KEY.add("asset_return");
		END_EVENT_KEY.add("overtime");
		END_EVENT_KEY.add("goOut");
		END_EVENT_KEY.add("evection");
	}
	/**
	 *  系统拷贝的流程名称，例如"leave"
	 */
	private String sysProcessKey;
	/**
	 * 流程key
	 */
	private String processKey;
	/**
	 *  流程发起人id
	 */
	private String startUserId;
	/**
	 *  流程实例id
	 */
	private String businessId;
	/**
	 * 流程处理结果状态，0：流程中，1通过，3拒绝，4撤回
	 */
	private String status;
	/**
	 * 主表数据
	 */
	private List<MyHashMap<String, Object>> main;
	/**
	 * 从表数据
	 */
	private List<MyHashMap<String, Object>> sub;
	
	public ActivitiEvent() {
		super(null);
	}

	public ActivitiEvent(String sysProcessKey, String processKey, String startUserId, String businessId,
			List<MyHashMap<String, Object>> main, List<MyHashMap<String, Object>> sub,String status) {
		super(processKey);
		this.sysProcessKey = sysProcessKey;
		this.processKey = processKey;
		this.startUserId = startUserId;
		this.businessId = businessId;
		this.main = main;
		this.sub = sub;
		this.status = status;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getProcessKey() {
		return processKey;
	}

	public void setProcessKey(String processKey) {
		this.processKey = processKey;
	}

	public String getStartUserId() {
		return startUserId;
	}

	public void setStartUserId(String startUserId) {
		this.startUserId = startUserId;
	}

	public List<MyHashMap<String, Object>> getMain() {
		return main;
	}

	public void setMain(List<MyHashMap<String, Object>> main) {
		this.main = main;
	}

	public List<MyHashMap<String, Object>> getSub() {
		return sub;
	}

	public void setSub(List<MyHashMap<String, Object>> sub) {
		this.sub = sub;
	}

	public String getBusinessId() {
		return businessId;
	}

	public void setBusinessId(String businessId) {
		this.businessId = businessId;
	}

	public String getSysProcessKey() {
		return sysProcessKey;
	}

	public void setSysProcessKey(String sysProcessKey) {
		this.sysProcessKey = sysProcessKey;
	}
	
}
